package operation;
import book.Book;
import booklist.BookList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-04-10
 * Time: 15:51
 */
public class ExitOperation implements Operation {
    @Override
    public void work(BookList booklist) {
        System.out.println("退出程序");
        int cursize = booklist.getBooksize();
        //销毁数据
        for(int i=0; i<cursize; i++) {
            booklist.setbook(i,null);
        }
        System.exit(0);
    }
}
